<%
  if measure(Metric::LINES) || measure(Metric::NCLOC)
    public_api=measure('public_api')
    public_documented_api_density=measure('public_documented_api_density')
    public_undocumented_api=measure('public_undocumented_api')
    comment_lines=measure('comment_lines')
    comment_lines_density=measure('comment_lines_density')
%>
<table width="100%">
  <tbody>
    <tr>
      <% if public_documented_api_density || public_api || public_undocumented_api %>
      <td valign="top" width="50%">
        <div class="dashbox">
          <p class="title"><%= message('widget.documentation_comments.documentation') -%></p>
          <p>
            <%
            if public_documented_api_density
            %>
            <span class="big"><%= format_measure(public_documented_api_density, :url => url_for_drilldown(Metric::PUBLIC_UNDOCUMENTED_API, :highlight => Metric::PUBLIC_DOCUMENTED_API_DENSITY))%></span><%= message('widget.documentation_comments.docu_api.suffix') %>
            <%= dashboard_configuration.selected_period? ? format_variation('public_documented_api_density') : trend_icon('public_documented_api_density') -%>
            <% end %>
          </p>
          <p>
            <%= format_measure(public_api,:url => url_for_drilldown(public_api), :suffix =>  message('widget.documentation_comments.public_api.suffix'))%>
            <%= dashboard_configuration.selected_period? ? format_variation(public_api) : trend_icon(public_api) -%>
          </p>
          <p>
            <%= format_measure(public_undocumented_api,:url => url_for_drilldown(public_undocumented_api), :suffix => message('widget.documentation_comments.undocu_api.suffix'))%>
            <%= dashboard_configuration.selected_period? ? format_variation(public_undocumented_api) : trend_icon(public_undocumented_api) -%>
          </p>
        </div>
      </td>
      <% end %>
      <td valign="top" width="50%">
        <div class="dashbox">
          <p class="title"><%= message('widget.documentation_comments.comments') -%></p>
          <p>
            <span class="big">
              <%= format_measure(comment_lines_density,:url => url_for_drilldown(comment_lines_density))%>
            </span>
            <%= dashboard_configuration.selected_period? ? format_variation(comment_lines_density) : trend_icon(comment_lines_density) -%>
          </p>
          <p>
            <%= format_measure(comment_lines,:url => url_for_drilldown(comment_lines), :suffix =>  message('widget.documentation_comments.lines.suffix'))%>
            <%= dashboard_configuration.selected_period? ? format_variation(comment_lines) : trend_icon(comment_lines) -%>
          </p>
        </div>
      </td>
    </tr>
  </tbody>
</table>
<%
  end
%>
